package ch.unisi.inf.gui.action;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;

import ch.unisi.inf.viewer.MainImgViewerPanel;


/**
 * @author Mohamed.Mosa@lu.unisi.ch
 * 
 * This class is responsable for callng the print utility class that holds the 
 * printComponent method.
 * 
 */
public final class PrintAction extends AbstractAction{

	private MainImgViewerPanel thumbPanel;
	public PrintAction(){
		putValue(Action.NAME, "Print");
		putValue(Action.MNEMONIC_KEY, KeyEvent.VK_P);
		putValue(Action.SHORT_DESCRIPTION, "Print a photo");
	}

	public void actionPerformed(ActionEvent e) {
		PrintUtilities.printComponent(thumbPanel);	
	}
}
